﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using QuanLyDatVe.DataAccessLayer;

namespace QLNHang.DAO
{
    class NhanVienDAO
    {
        private ConnectDatabase cn = new ConnectDatabase();
        public int DangNhap(String tenDangNhap, String matKhau)
        {
            cn.OpenDatabase();
            SqlCommand cmd = new SqlCommand("sp_DangNhap", cn.SqlConnect);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@tenDangNhap", SqlDbType.VarChar, 50).Value = tenDangNhap;
            cmd.Parameters.Add("@hoTen", SqlDbType.Char, 32).Value = matKhau;
            cmd.ExecuteScalar();
            cn.CloseDatabase();



          
            return 1;
        }
    }
}
